package com.yao.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户所绑定的股票等编号
 *
 * @author 妖悲冥
 * @date 2021/5/17 0017   -    11:50
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ManageFinances {
    private String id;
    private int userId;
    /**
     * 基金1 黄金2 股票3
     */
    private int financesId;
    private String financesNumber;

    public void setId() {
        this.id = userId + "-" + financesId + "-" + financesNumber;
    }

    public String getId() {
        if (id != null) {
            return id;
        }
        setId();
        return id;
    }
}
